package www.webols.api;

import java.text.ParseException;
import java.util.Date;

import android.util.Log;

import www.webols.utils.StringUtil;

public class WeiboItem {
	
	private long id;
	private String text;
	private User user;
	private String thumbnailPic ;
	private String source;
	private Date createdAt;
	
	public void setStringCreateAt(String createdAt){
		try {
			this.createdAt=StringUtil.parseFormat.parse(createdAt);
		} catch (ParseException e) {
			//keep null, do nothing
		}
	}
	public String getStringCreatedAt(){
		if(this.createdAt!=null){
			return StringUtil.format.format(this.createdAt);
		}
		return "";
	}
	
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public Date getCreatedAt() {
		return createdAt;
	}
	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
	public String getThumbnailPic() {
		return thumbnailPic;
	}
	public void setThumbnailPic(String thumbnailPic) {
		this.thumbnailPic = thumbnailPic;
	}
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
}
